﻿<html>
<head>
    <title>Make Page Red</title>
    <script language="javascript" type="text/javascript">
        // Called when the user clicks on the browser action.
        chrome.browserAction.onClicked.addListener(function (tab) {
            chrome.tabs.executeScript(null, { code: "document.body.bgColor='red'" });
            notification.show();
        });

        chrome.browserAction.setBadgeBackgroundColor({ color: [255, 0, 0, 255] });

        var i = 0;
        window.setInterval(function () {
            chrome.browserAction.setBadgeText({ text: String(i) });
            i++;
        }, 10);

        var notification = webkitNotifications.createNotification(
  'icon.png',  // icon url - can be relative
  'Hello!',  // notification title
  'Lorem ipsum...'  // notification body text
);

//        // Or create an HTML notification:
//        var notification = webkitNotifications.createHTMLNotification(
//  'notification.html'  // html url - can be relative
//);

        // Then show the notification.
       
    </script>
</head>
<body>
</body>
</html>
